

// console.log(window.BMap);
function getcity(){
    return new Promise((resolve,reject)=>{
        const curCity = new window.BMap.LocalCity()
            console.log(curCity)
            curCity.get(res=>{
                console.log(res)// 可以封装promise
                let name=res.name.replace("市",'')
                resolve(name)
            })
    })
}

export default getcity